#include "stdafx.h"
#include "BaseDialog.h"


BEGIN_MESSAGE_MAP(CBaseDialog, CSizingControlBarG)
  ON_WM_CREATE()
  ON_WM_SIZE()
END_MESSAGE_MAP()


CBaseDialog::CBaseDialog(CCreateContext* pContext)
{
  m_pContext = pContext;
  CRuntimeClass* pFactory = RUNTIME_CLASS(CBibleForm);
  m_pFormView = (CBibleForm *)(pFactory->CreateObject() );

}

int CBaseDialog::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
  if (CSizingControlBarG::OnCreate(lpCreateStruct) == -1)
    return -1;

   if (m_pFormView )  m_pFormView->CreateView(this, m_pContext,instance);
  
    return 0;
}


void CBaseDialog::OnSize(UINT nType, int cx, int cy)
{
  CSizingControlBarG::OnSize(nType, cx, cy);
  m_pFormView->SetWindowPos(NULL,0,0,cx,cy,SWP_NOZORDER);
        

}

CBaseDialog::~CBaseDialog(void)
{
}

void CBaseDialog::SetSize(int cx, int cy)
{
   m_szHorz =  CSize(cx, cy);
   m_szVert = CSize(cx, cy);
   m_szFloat = CSize(cx, cy);
}
